import 'dart:ui';

import 'package:flutter/material.dart';

// flutter 颜色使用ARGB

class ThemeColor {
  static Color hex(String hexColor, {double opacity = 1.0}) {
    hexColor.replaceAll('#', '');
    hexColor = hexColor.toUpperCase().replaceAll("0xFF", "");

    if (hexColor.length == 6) {
      hexColor = "FF$hexColor";
    } else {
      hexColor = "FFFFFFFF";
    }
    return Color(int.parse(hexColor, radix: 16)).withOpacity(opacity);
  }

  // static const Color primary = Color(0xFF64D6EE);
  static const Color color8993A6 = Color(0xFF8993A6);

  // static const Color primaryColor = ThemeColor.primaryColor;
  static const Color primaryColor = Color(0xFF64D6EE);

  // 辅色
  static const Color color005CA7 = Color(0xFF005CA7);
  static const Color color7ECEF4 = Color(0xFF7ECEF4);
  static const Color color008D39 = Color(0xFF008D39);
  static const Color color8FC31F = Color(0xFF8FC31F);
  static const Color colorF5A200 = Color(0xFFF5A200);

  // static const Color colorFDD000 = ThemeColor.primaryColor;
  static const Color colorDF0011 = Color(0xFFDF0011);
  static const Color colorF4F4F4 = Color(0xFFF4F4F4);
  static const Color color979797 = Color(0xFF979797);

  // 文字颜色 黑色
  static const Color colorBlack100 = Color(0xFF000000);
  static const Color colorBlack80 = Color.fromRGBO(0, 0, 0, 0.8);
  static const Color colorBlack60 = Color.fromRGBO(0, 0, 0, 0.6);
  static const Color colorBlack50 = Color.fromRGBO(0, 0, 0, 0.5);
  static const Color colorBlack40 = Color.fromRGBO(0, 0, 0, 0.4);
  static const Color colorBlack30 = Color.fromRGBO(0, 0, 0, 0.3);
  static const Color colorBlack20 = Color.fromRGBO(0, 0, 0, 0.2);
  static const Color colorBlack10 = Color.fromRGBO(0, 0, 0, 0.1);

  static const Color colorTextB0 = Colors.black;
  static const Color colorTextB1 = Color(0xFF0D131F);
  static const Color colorTextB2 = Color(0xFF2E3748);
  static const Color colorTextB3 = Color(0xFF5A6378);
  static const Color colorTextB4 = Color(0xFF8993A6);
  static const Color colorTextB5 = Color(0xFFC8CED9);
  static const Color colorTextB6 = Color(0xFFE6E8ED);
  static const Color colorTextB7 = Color(0xFFF9F9F9);

  static const Color colorPrimaryA1 = Color(0xFF1FC0EC);
  static const Color colorPrimaryA2 = Color(0xFF64D6EE);
  static const Color colorPrimaryA3 = Color(0xFFA9F6FC);
  static const Color colorPrimaryA4 = Color(0xFFC1F5F3);
  static const Color colorPrimaryA5 = Color(0xFFDEF3F1);
  static const Color colorPrimaryA6 = Color(0xFFFFFFFF);

  static const Color colorSecondaryC1 = Color(0xFFFF4B4B);
  static const Color colorSecondaryC2 = Color(0xFFFF8730);
  static const Color colorSecondaryC3 = Color(0xFFFFD023);
  static const Color colorSecondaryC4 = Color(0xFF26D172);
  static const Color colorSecondaryC5 = Color(0xFF00D2C9);
  static const Color colorSecondaryC6 = Color(0xFF007DE3);
  static const Color colorSecondaryC7 = Color(0xFFA158FF);

  static const Color colorBtnL1 = Color(0xFFD7FE60);
  static const Color colorBtnL2 = Color(0xFF65E3FF);
  static const Color colorBtnL3 = Color(0xFFF2CAFE);



  // 文字链接
  static const Color linkColor = Color(0xFF2942D1);

  // 分割线
  static const Color dividerColor = Color(0xFFEFEFEF);

  // 分割线2
  static const Color dividerColor_grey = Color(0xFFDADADA);

  // 背景颜色
  static const Color bkColorF8F8F8 = Color(0xFFF8F8F8);
  static const Color bkColorFFFFFF = Color(0xFFFFFFFF);

  // 封面背景
  static const Color ckColorFFFFFF = Colors.blueGrey;
}
